/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

/**
 * <p>Project: javase2203 - ForColor
 * <p>Powered by webrx On 2022-07-14 15:43:02
 * <p>Created by IntelliJ IDEA
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class ForColor {

    public static void main(String[] args) {
        outRed("hello world");
        System.out.println();
        outGreenln("hello world");
    }

    static void outRed(String str){
        System.out.printf("\033[31m%s",str);
    }

    static void outGreen(String str){
        System.out.printf("\033[32m%s",str);
    }
    static void outGreenln(String str){
        System.out.printf("\033[32m%s%n",str);
    }
    public static void ccc(String[] args) {
        //30
        for(int i=30;i<=38;i++) {
            System.out.printf("\033[%dm [color - %d] ",i,i);
        }
        System.out.println();

        //40
        for(int i=40;i<=47;i++) {
            System.out.printf("\033[%dm\033[32mhello%d\033[0m%n",i,i);
        }
    }
}
